package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dao.GoodsDao;
import com.example.entity.Goods;
import com.example.service.GoodsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * (Goods)表服务实现类
 *
 * @author makejava
 * @since 2023-01-31 13:59:16
 */
@Service("goodsService")
public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements GoodsService {

    @Override
    @Transactional
    public int add() {
        Goods goods = new Goods();
        goods.setId(1);
        goods.setName("Iphone13 pro max");
        return baseMapper.insert(goods);
    }
}

